package com.cross.hibernate;

import org.hibernate.Session;

import com.cross.core.AbstractWriter;

public class SimplePojoWriter<T> extends AbstractWriter {
	private Session session = null;
	
	public SimplePojoWriter(Session session) throws Exception{
		this.session = session;
	}
	
	@Override
	protected void writeRow() {
		session.save(currentRow);
	}

	@Override
	public void close() {
		session.close();
	}
}
